{% extends "base.html" %}

{% block title %}{% if map %}{{map.name}}{% else %}Map Not Found{% endif %}{% endblock %}

{% block content %}
{% if map %}
<h2><a href="/map/{{map.id}}">{{map.name}}</a></h2>
<ul>
    <li>ID: {{map.id}}</li>
    <li>URL: {{map.url}}</li>
    <li>Submitted By: {{map.submitted_by}}</li>
    {% if posrefs %}
    <li>Position References:
        {% for pr in posrefs %}
        <ul>
            <li>ID: {{pr.id}}</li>
            <li>Geo Reference (Real lat/long point): {{pr.geo_ref}}</li>
            <li>Location Reference (Corresponding (x,y) coordinate on map): {{pr.loc_ref}}</li>
            <li>Scale (pixels per unit): {{pr.scale}}</li>
            <li>Rotation (angle to rotation map so indicated North points straight up): {{pr.rotation}}</li>
            <li>Positioned By: {{pr.positioned_by}}</li>
        </ul>
        {% endfor %}
    </li>
    {% endif %}
</ul>
<p>
<img src="{{map.url}}" alt="{{map.name}}">
</p>
{% else %}
<h2>Map Not Found</h2>
<p><a href="/maps">&lt;&lt; Back to Map List</a></p>
{% endif %}
{% endblock %}
